<template>
  <div>
    <!--工具条-->
    <el-row>
      <el-col :span="8">
        <el-form ref="elForm" size="medium" label-width="100px">
          <el-form-item label="表单名称" label-width="100px">
            <el-input
              placeholder="表单名称"
              size="small"
              v-model="queryparam.fromname"
            ></el-input>
          </el-form-item>
        </el-form>
      </el-col>
      <el-col :span="16">
        <el-button
          type="primary"
          size="small"
          @click="$refs.gridlist.loadData(1)"
          style="margin-left: 10px;"
          >查询</el-button
        >
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="24">
        <gridlist
          :queryparam="queryparam"
          apicode="tappFrom.queryFromList"
          ref="gridlist"
          :scopedSlots="scopedSlots"
        >
          <template slot="operation" slot-scope="record">
            <a
              class="margin-a"
              href="javascript:;"
              style="margin-right: 5px;"
              @click="selectfromname(record.row)"
              >选择</a
            >
          </template>
        </gridlist>
      </el-col>
    </el-row>
  </div>
</template>
<script>
export default {
  props: ['fromtype'],
  data() {
    return {
      queryparam: { fromname: '', fromtype: this.fromtype },
      scopedSlots: [],
      questionName: ''
    }
  },
  created() {},
  methods: {
    selectfromname(rows) {
      this.$emit('selectconfirm', rows)
    }
  }
}
</script>
